package com.fortune.rainshine.feign.service;

import com.fortune.rainshine.config.FeignConfig;
import com.fortune.rainshinecommon.base.MsgModel;
import com.fortune.rainshinecommon.base.ParmsModel;
import com.fortune.rainshinecommon.model.ProductModel;
import com.fortune.rainshinecommon.query.ProductQuery;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(value = "rain-shine-service",configuration = FeignConfig.class)
@Controller
public interface ProductFeign {

    @PostMapping("/product/createProduct")
    @ResponseBody
    MsgModel createProduct(@RequestBody ProductModel productModel);

    @PostMapping("/product/updateProduct")
    @ResponseBody
    MsgModel updateProduct(@RequestBody ProductModel productModel);

    @PostMapping("/product/productList")
    @ResponseBody
    MsgModel productList(@RequestBody ParmsModel parm);

    @PostMapping("/product/delProduct")
    @ResponseBody
    MsgModel delProduct(@RequestBody ProductModel productModel);

    @PostMapping("/product/appGetProductInfo")
    @ResponseBody
    MsgModel appGetProductInfo(@RequestBody ProductQuery query);
}
